home *** CD-ROM | disk | FTP | other *** search
- /*
- ShadowText
- Add a "shadow" to an IntuiText
- */
-
- OPTIONS RESULTS
-
- SIGNAL ON ERROR
-
- ADDRESS 'IEDITOR.1'
-
-
- /* Ask the user to select a text */
-
- 'GETITEXT'
- which = result
-
-
- /* Get the text's attrs */
-
- 'GETITEXTATTR' which txt
-
-
- /* Get the Shadow Pen color number */
-
- 'GETDRIPEN' 4
-
-
- /* Change the selected text (the shadow must be drawn before the
- normal text) and move it a pixel down and two right */
-
- 'SETITEXTATTR' which 'FP' result 'M 0 X' txt.leftedge+2 'Y' txt.topedge+1
-
-
- /* Add the new text */
-
- 'ADDITEXT' txt.frontpen txt.backpen '0' txt.leftedge txt.topedge '"'txt.text'"'
- newone = result
-
-
- /* If the old text has a font, set it */
-
- if txt.font >= 0 then 'SETITEXTATTR' newone 'FONT' txt.font
-
- EXIT
-
-
- ERROR:
-
- say 'Error' RC 'on line' SIGL
-
- EXIT RC
-